package homework.day02;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入用户名");
        String str = scan.nextLine();
        if (str.matches("\\w{3,15}")){
            System.out.println("请输入年龄");
            Scanner scan1 = new Scanner(System.in);
            String str1 =  scan1.nextLine();
            if (str1.matches("\\d+")){
                if (str1.matches("\\d{1,2}|100")){
                    System.out.println("年龄在0-100之间");
                }else {
                    System.out.println("年龄不在0-100之间");
                }


            }else {
                System.out.println("年龄有误");
            }
        }else{
            System.out.println("用户名有误");
        }

    }
}
